package com.kaigejava.linkedlist;

import org.junit.Test;

/**
 * @author kaigejava
 * 简单链表测试类
 */
public class LinkedListDemo1 {

    @Test
    public void linkdeListTest(){
        LinkedList linkedList = new LinkedList();
        Node node = new Node(1,"张三","逍遥门");
        Node node2 = new Node(2,"李四","五月门");
        Node node3 = new Node(4,"李s四","五月f门");

        linkedList.add(node);
        linkedList.add(node2);
        linkedList.add(node3);
        linkedList.showAll();
        System.out.println();
       /* //更新
        Node updateNode = new Node(1,"掌上","逍遥门");
        linkedList.updateNode(updateNode);
        linkedList.showAll();
        System.out.println();
        //删除
        linkedList.delNode(updateNode);
        linkedList.showAll();*/
        Node node4 = new Node(3,"李3","五3门");
        linkedList.addPushByNo(node4);
        linkedList.showAll();


    }
}
